//////////////////////////////////////////////
// System.h
//
//////////////////////////////////////////////

/// Defines / Macros -------------------------

#pragma once

/// Forward decl -----------------------------

namespace nkInputs
{
	class InputSystem ;
	class KeyboardDeviceManager ;
	class LogManager ;
	class MouseDeviceManager ;
}

/// Includes ---------------------------------

// nkInputs
#include "Dll/DllDefines.h"

// Common
#include <nilkinsCommon/Patterns/MaybeSingletonClass.h>

/// Class ------------------------------------

namespace nkInputs
{
	class DLL_INPUTS_EXPORT System final : public nkCommon::MaybeSingletonClass<System>
	{
		public :

			// Functions
			// Constructor, destructor
			System () noexcept ;
			virtual ~System () ;

			// Getters
			bool isInitialized () const ;
			InputSystem* getInputSystem () const ;
			KeyboardDeviceManager* getKeyboardDeviceManager () const ;
			LogManager* getLogManager () const ;
			MouseDeviceManager* getMouseDeviceManager () const ;

			// Lifetime
			bool initialize () ;
			void shutdown () ;

		private :

			// Functions
			// Constructors
			System (bool isSingleton) noexcept ;
			System (const System&) = delete ;
			System (System&&) = delete ;

			// Operators
			System& operator= (const System&) = delete ;
			System& operator= (System&&) = delete ;

		private :

			// Attributes
			// Internal created input system
			InputSystem* _inputSystem ;

			// Managers
			KeyboardDeviceManager* _keyboardDeviceManager ;
			LogManager* _logManager ;
			MouseDeviceManager* _mouseDeviceManager ;

		private :

			friend class nkCommon::MaybeSingletonClass<System> ;
	} ;
}